/*eslint-disable*/
var asyncRouter = require('../helpers/asyncRouter');
const router = asyncRouter();
module.exports = (app) => {
    app.use('/rs-server', router)
}
router.all('/*', async(req, res, next) => {
    const path = req.path,
        method = req.method,
        args = method === 'POST' ? req.body : req.query;
    var responseData = await req.api(path, method, { body: args });
    return res.json(responseData);
})